const moduleUser = {
  namespaced: true,
  state: {
    userId: localStorage.getItem("userId"),
    header: localStorage.getItem("header"),
    nickName: localStorage.getItem("nickName"),
    telPhone:localStorage.getItem("telPhone"),
    email:localStorage.getItem("email"),
    gender:localStorage.getItem("gender"),
    userName:localStorage.getItem("userName"),
    birthday:localStorage.getItem("birthday"),
    staticpath:localStorage.getItem('staticpath'),
    isBack:false,
    currentRentPath:localStorage.getItem('currentRentPath')
  },
  mutations: {
    getId(state, userId) {
      state.userId = userId
    },
    getNickName(state, nickName) {
      state.nickName = nickName
    },
    getHeader(state,header){
      state.header = header
    },
    getBirthday(state,birthday){
      state.birthday = birthday
    },
    getEmail(state,email) {
      state.email = email
    },
    getGender(state,gender){
      state.gender = gender
    },
    getTelPhone(state,telphone) {
      state.telPhone = telphone
    },
    getUserName(state,userName) {
      state.userName = userName
    },
    isBackToTrue(state){
      state.isBack = true
    },
    isBackToFalse(state){
      state.isBack = false
    },
    getCurrentRentPath(state,currentRentPath){
      state.currentRentPath = currentRentPath
    },
    getStaticpath(state,staticpath){
      state.staticpath = staticpath
    }
  }
}

export default moduleUser